home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_01_07
/
1n07036c
< prev
next >
Wrap
Text File
|
1990-10-14
|
346b
|
17 lines
LISTING 6
#define SEND_TIMEOUT 5 * 1000 /* 5 seconds, in ms. */
void timeout(int nd)
{
long tmo = SEND_TIMEOUT;
/* Set the timeout option, so our reads won't wait forever. */
if ((set_option(nd, DGRAM, NET_OPT_TIMEOUT,
(char far *)tmo, 4)) != 0) {
printf("Send: couldn't set timeout option.\n");
exit(1);
}
}